<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<p>段落1</p>
		<p>段落2</p>
		<p>段落3</p>
		<p>段落4</p>
		<p>段落5</p>
		<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$("p").click(function () {
				alert($(this).text());
			});			
		</script>
		<input type="checkbox" value="兴趣1" />兴趣1
		<input type="checkbox" value="兴趣2" />兴趣2
		<input type="checkbox" value="兴趣3" />兴趣3
		<input type="checkbox" value="兴趣4" />兴趣4
		<input type="checkbox" value="兴趣5" />兴趣5		
		<input type="checkbox" value="兴趣6" />兴趣6
		<input type="button" value="确定" id="btn"/>
		<script type="text/javascript">
			
			$("#btn").click(function () {
				var ckbs=$(":checkbox:checked");
				alert(ckbs.length);
				ckbs.each(function (i,ele) {
					alert($(ele).val())
				});
			});
		</script>
	</body>
</html>
